module.exports = (req,res,next)=>{
    const {adminName,password} = req.body
    const userReg = /^[a-zA-Z][a-zA-Z0-9]{3,5}$/g
    const passReg = /^[0-9]{3,6}$/g
    if(!userReg.test(adminName)){
        return res.send({
            code: 10003,
            msg:'用户名错误(以字母开头，后面3-5位数字或字母)',
            data: null
        })
    }
    if(!passReg.test(password)){
        return res.send({
            code: 10004,
            msg: '密码错误(3-6位数字)',
            data: null
        })
    }
    next()
}